package cn.stu.projectsummit.comment.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;
/**
 * 查询评论以及其子评论
 */
@Data
public class CommentListVO {

    @ApiModelProperty(value = "评论id")
    private Long id;
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "用户名")
    private String userName;
    @ApiModelProperty(value = "用户头像")
    private String imgUrl;
    @ApiModelProperty(value = "学校")
    private String schoolName;
    @ApiModelProperty(value = "评论所属帖子id")
    private Long blogId;
    @ApiModelProperty(value = "评论内容")
    private String content;
    @ApiModelProperty(value = "父评论id 如果是根评论则为null")
    private Long parentId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "评论时间")
    private Date createTime;
    @ApiModelProperty(value = "子评论列表")
    private List<CommentListVO> children;
}
